<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ include file="/page/share/taglib.jsp"%>
<%
	String root = request.getContextPath();
	response.setHeader("Cache-Control", "no-store"); //HTTP1.1
	response.setHeader("Pragma", "no-cache"); //HTTP1.0
	response.setDateHeader("Expires", 0);
%>
<form name="queryForm" id="queryForm"
	action="<%=request.getContextPath()%>/batchCtl/batchMngt!listJobInfo.do"
	method="post">
	<input type="hidden" name="curPageNo" id="currentPgNoHid"
		value="<s:property value="curPageNo" />" />
</form>
<div id="queryListDiv">
	<h2 class="u-title">系统中包括的所有---任务信息：</h2>

	<table class="datashow" style="width: 95%; table-layout: fixed;"
		cellpadding="0" cellspacing="0">
		<thead>
			<tr>
				<th width="10%" class="table_head">批次编号</th>
				<th width="10%" class="table_head">任务编号</th>
				<th width="10%" class="table_head">任务名称</th>
				<th width="10%" class="table_head">任务控制位</th>
				<th width="10%" class="table_head">详细查看</th>
			</tr>
		</thead>
		<tbody>
			<s:if test="jobPageInfo.records.size > 0">
				<s:iterator value="jobPageInfo.records" var="jobInfo"
					status="status">
					<s:if test="#status.odd">
						<tr class="style1">
							<td><s:property value="#jobInfo.batchNo" /></td>
							<td><s:property value="#jobInfo.jobNo" /></td>
							<td><s:property value="#jobInfo.jobDesc" /></td>
							<td><s:property value="#jobInfo.chJobCtrlFlgs" /></td>
							<td class="txtCenter"><a href="#"
								onclick="findSubJob('<s:property value="#jobInfo.batchNo" />','<s:property value="#jobInfo.jobNo" />');"
								targets="step" button="true"> 包括的步骤 </a></td>
						</tr>
					</s:if>
					<s:else>
						<tr class="style2">
							<td><s:property value="#jobInfo.batchNo" /></td>
							<td><s:property value="#jobInfo.jobNo" /></td>
							<td><s:property value="#jobInfo.jobDesc" /></td>
							<td><s:property value="#jobInfo.chJobCtrlFlgs" /></td>
							<td class="txtCenter"><a href="#"
								onclick="findSubJob('<s:property value="#jobInfo.batchNo" />','<s:property value="#jobInfo.jobNo" />');"
								targets="step" button="true"> 包括的步骤 </a></td>
						</tr>
					</s:else>
				</s:iterator>
			</s:if>
			<s:else>
				<tr>
					<td><span style="color: blue">暂无记录！</span></td>
				</tr>
			</s:else>
		</tbody>
	</table>

	<table class="datashow" style="width: 95%; table-layout: fixed;"
		cellpadding="0" cellspacing="0">
		<tr>
			<td width="100%" align="center"><SPAN class="pagebanner">
					共<label id="allSize">${jobPageInfo.totalrecord}</label>条记录&nbsp;&nbsp;&nbsp;
					<label id="currentPage">${jobPageInfo.currentpage}</label>/<label
					id="allPages">${jobPageInfo.totalpage}</label>页 &nbsp;&nbsp;&nbsp;
					<input type="button" value="转至" onclick="myGotoPage(); " /> <input
					type="text" style="width: 45px; text-align: center;"
					id="changePageTo" name="changePageTo"
					value="${jobPageInfo.currentpage }"></input>页 &nbsp;&nbsp;&nbsp; <a
					href="#" onclick="myPrePage();"> <IMG
						src="<%=root%>/resources/images/btn_arrowback.jpg"></a>&nbsp;
					<a href="#" onclick="myNextPage();"> <IMG
						src="<%=root%>/resources/images/btn_arrowforward.jpg"></a>
			</SPAN> <%-- 返回处理 --%> <input type="hidden" name="backFlag"
				value="${backFlag}" id="backFlag" /></td>
		</tr>
	</table>
	<div id="result"></div>
</div>


	     
 <script type="text/javascript">
 
       function findSubJob(batchNOVal, jobNoVal) {
			var _ctx = "<%=root%>";

		var url = _ctx + "/batchCtl/batchMngt!stepsFromJob.do";
			$.get(url, {
				batchNo : batchNOVal,
				jobNo : jobNoVal
			}, function(data, textSatus) {
				$("#result").html(data);
			});
		}
</script>   
